\(\int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx\) [717]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 106 \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {5 \text {arctanh}(\cos (c+d x))}{16 a d}-\frac {\cot ^7(c+d x)}{7 a d}+\frac {5 \cot (c+d x) \csc (c+d x)}{16 a d}-\frac {5 \cot ^3(c+d x) \csc (c+d x)}{24 a d}+\frac {\cot ^5(c+d x) \csc (c+d x)}{6 a d} \]

[Out]

-5/16*arctanh(cos(d*x+c))/a/d-1/7*cot(d*x+c)^7/a/d+5/16*cot(d*x+c)*csc(d*x+c)/a/d-5/24*cot(d*x+c)^3*csc(d*x+c)
/a/d+1/6*cot(d*x+c)^5*csc(d*x+c)/a/d

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2785, 2687, 30, 2691, 3855} \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {5 \text {arctanh}(\cos (c+d x))}{16 a d}-\frac {\cot ^7(c+d x)}{7 a d}+\frac {\cot ^5(c+d x) \csc (c+d x)}{6 a d}-\frac {5 \cot ^3(c+d x) \csc (c+d x)}{24 a d}+\frac {5 \cot (c+d x) \csc (c+d x)}{16 a d} \]

[In]

Int[Cot[c + d*x]^8/(a + a*Sin[c + d*x]),x]

[Out]

(-5*ArcTanh[Cos[c + d*x]])/(16*a*d) - Cot[c + d*x]^7/(7*a*d) + (5*Cot[c + d*x]*Csc[c + d*x])/(16*a*d) - (5*Cot
[c + d*x]^3*Csc[c + d*x])/(24*a*d) + (Cot[c + d*x]^5*Csc[c + d*x])/(6*a*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2785

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {\int \cot ^6(c+d x) \csc (c+d x) \, dx}{a}+\frac {\int \cot ^6(c+d x) \csc ^2(c+d x) \, dx}{a} \\ & = \frac {\cot ^5(c+d x) \csc (c+d x)}{6 a d}+\frac {5 \int \cot ^4(c+d x) \csc (c+d x) \, dx}{6 a}+\frac {\text {Subst}\left (\int x^6 \, dx,x,-\cot (c+d x)\right )}{a d} \\ & = -\frac {\cot ^7(c+d x)}{7 a d}-\frac {5 \cot ^3(c+d x) \csc (c+d x)}{24 a d}+\frac {\cot ^5(c+d x) \csc (c+d x)}{6 a d}-\frac {5 \int \cot ^2(c+d x) \csc (c+d x) \, dx}{8 a} \\ & = -\frac {\cot ^7(c+d x)}{7 a d}+\frac {5 \cot (c+d x) \csc (c+d x)}{16 a d}-\frac {5 \cot ^3(c+d x) \csc (c+d x)}{24 a d}+\frac {\cot ^5(c+d x) \csc (c+d x)}{6 a d}+\frac {5 \int \csc (c+d x) \, dx}{16 a} \\ & = -\frac {5 \text {arctanh}(\cos (c+d x))}{16 a d}-\frac {\cot ^7(c+d x)}{7 a d}+\frac {5 \cot (c+d x) \csc (c+d x)}{16 a d}-\frac {5 \cot ^3(c+d x) \csc (c+d x)}{24 a d}+\frac {\cot ^5(c+d x) \csc (c+d x)}{6 a d} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(284\) vs. \(2(106)=212\).

Time = 0.64 (sec) , antiderivative size = 284, normalized size of antiderivative = 2.68 \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\csc ^5(c+d x) \left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^2 \left (1680 \cos (c+d x)+1008 \cos (3 (c+d x))+336 \cos (5 (c+d x))+48 \cos (7 (c+d x))+3675 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)-3675 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)-1190 \sin (2 (c+d x))-2205 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))+2205 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))+392 \sin (4 (c+d x))+735 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin (5 (c+d x))-735 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (5 (c+d x))-462 \sin (6 (c+d x))-105 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin (7 (c+d x))+105 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (7 (c+d x))\right )}{86016 a d (1+\sin (c+d x))} \]

[In]

Integrate[Cot[c + d*x]^8/(a + a*Sin[c + d*x]),x]

[Out]

-1/86016*(Csc[c + d*x]^5*(Csc[(c + d*x)/2] + Sec[(c + d*x)/2])^2*(1680*Cos[c + d*x] + 1008*Cos[3*(c + d*x)] +
336*Cos[5*(c + d*x)] + 48*Cos[7*(c + d*x)] + 3675*Log[Cos[(c + d*x)/2]]*Sin[c + d*x] - 3675*Log[Sin[(c + d*x)/
2]]*Sin[c + d*x] - 1190*Sin[2*(c + d*x)] - 2205*Log[Cos[(c + d*x)/2]]*Sin[3*(c + d*x)] + 2205*Log[Sin[(c + d*x
)/2]]*Sin[3*(c + d*x)] + 392*Sin[4*(c + d*x)] + 735*Log[Cos[(c + d*x)/2]]*Sin[5*(c + d*x)] - 735*Log[Sin[(c +
d*x)/2]]*Sin[5*(c + d*x)] - 462*Sin[6*(c + d*x)] - 105*Log[Cos[(c + d*x)/2]]*Sin[7*(c + d*x)] + 105*Log[Sin[(c
 + d*x)/2]]*Sin[7*(c + d*x)]))/(a*d*(1 + Sin[c + d*x]))

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.39 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.58

method result size
risch \(-\frac {-336 i {\mathrm e}^{12 i \left (d x +c \right )}+231 \,{\mathrm e}^{13 i \left (d x +c \right )}-196 \,{\mathrm e}^{11 i \left (d x +c \right )}-1680 i {\mathrm e}^{8 i \left (d x +c \right )}+595 \,{\mathrm e}^{9 i \left (d x +c \right )}-1008 i {\mathrm e}^{4 i \left (d x +c \right )}-595 \,{\mathrm e}^{5 i \left (d x +c \right )}+196 \,{\mathrm e}^{3 i \left (d x +c \right )}-48 i-231 \,{\mathrm e}^{i \left (d x +c \right )}}{168 a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{7}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{16 d a}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{16 d a}\) \(168\)
derivativedivides \(\frac {\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7}-\frac {\left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-15 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}+40 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {15}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {1}{7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}-\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}+\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}-\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {5}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{128 d a}\) \(200\)
default \(\frac {\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7}-\frac {\left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-15 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}+40 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {15}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {1}{7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}-\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}+\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}-\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {5}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{128 d a}\) \(200\)
parallelrisch \(\frac {3 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 \left (\cot ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+7 \left (\cot ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-21 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+21 \left (\cot ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+63 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-63 \left (\cot ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+63 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-63 \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-315 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+315 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+840 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-105 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+105 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )}{2688 d a}\) \(200\)
norman \(\frac {-\frac {1}{896 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{672 d a}+\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{96 d a}-\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d a}-\frac {3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d a}+\frac {3 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d a}+\frac {5 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d a}-\frac {5 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d a}-\frac {3 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d a}+\frac {3 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d a}+\frac {\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d a}-\frac {\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )}{96 d a}-\frac {\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )}{672 d a}+\frac {\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )}{896 d a}+\frac {5 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 a d}\) \(318\)

[In]

int(cos(d*x+c)^8*csc(d*x+c)^8/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/168*(-336*I*exp(12*I*(d*x+c))+231*exp(13*I*(d*x+c))-196*exp(11*I*(d*x+c))-1680*I*exp(8*I*(d*x+c))+595*exp(9
*I*(d*x+c))-1008*I*exp(4*I*(d*x+c))-595*exp(5*I*(d*x+c))+196*exp(3*I*(d*x+c))-48*I-231*exp(I*(d*x+c)))/a/d/(ex
p(2*I*(d*x+c))-1)^7+5/16/d/a*ln(exp(I*(d*x+c))-1)-5/16/d/a*ln(exp(I*(d*x+c))+1)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 198 vs. \(2 (96) = 192\).

Time = 0.26 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.87 \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {96 \, \cos \left (d x + c\right )^{7} - 105 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 105 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 14 \, {\left (33 \, \cos \left (d x + c\right )^{5} - 40 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{672 \, {\left (a d \cos \left (d x + c\right )^{6} - 3 \, a d \cos \left (d x + c\right )^{4} + 3 \, a d \cos \left (d x + c\right )^{2} - a d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)^8*csc(d*x+c)^8/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/672*(96*cos(d*x + c)^7 - 105*(cos(d*x + c)^6 - 3*cos(d*x + c)^4 + 3*cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c)
 + 1/2)*sin(d*x + c) + 105*(cos(d*x + c)^6 - 3*cos(d*x + c)^4 + 3*cos(d*x + c)^2 - 1)*log(-1/2*cos(d*x + c) +
1/2)*sin(d*x + c) - 14*(33*cos(d*x + c)^5 - 40*cos(d*x + c)^3 + 15*cos(d*x + c))*sin(d*x + c))/((a*d*cos(d*x +
 c)^6 - 3*a*d*cos(d*x + c)^4 + 3*a*d*cos(d*x + c)^2 - a*d)*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**8*csc(d*x+c)**8/(a+a*sin(d*x+c)),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 315 vs. \(2 (96) = 192\).

Time = 0.21 (sec) , antiderivative size = 315, normalized size of antiderivative = 2.97 \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {315 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {63 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {63 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {7 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {3 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a} - \frac {840 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {{\left (\frac {7 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {21 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {63 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {63 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {315 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {105 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - 3\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{7}}{a \sin \left (d x + c\right )^{7}}}{2688 \, d} \]

[In]

integrate(cos(d*x+c)^8*csc(d*x+c)^8/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/2688*((105*sin(d*x + c)/(cos(d*x + c) + 1) + 315*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 63*sin(d*x + c)^3/(c
os(d*x + c) + 1)^3 - 63*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 7*sin(d
*x + c)^6/(cos(d*x + c) + 1)^6 - 3*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a - 840*log(sin(d*x + c)/(cos(d*x + c)
 + 1))/a - (7*sin(d*x + c)/(cos(d*x + c) + 1) + 21*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 63*sin(d*x + c)^3/(co
s(d*x + c) + 1)^3 - 63*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 315*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 105*sin
(d*x + c)^6/(cos(d*x + c) + 1)^6 - 3)*(cos(d*x + c) + 1)^7/(a*sin(d*x + c)^7))/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (96) = 192\).

Time = 0.38 (sec) , antiderivative size = 244, normalized size of antiderivative = 2.30 \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {840 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {3 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 7 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 21 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 63 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 63 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 315 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 105 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{7}} - \frac {2178 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 315 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 63 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 63 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 7 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7}}}{2688 \, d} \]

[In]

integrate(cos(d*x+c)^8*csc(d*x+c)^8/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/2688*(840*log(abs(tan(1/2*d*x + 1/2*c)))/a + (3*a^6*tan(1/2*d*x + 1/2*c)^7 - 7*a^6*tan(1/2*d*x + 1/2*c)^6 -
21*a^6*tan(1/2*d*x + 1/2*c)^5 + 63*a^6*tan(1/2*d*x + 1/2*c)^4 + 63*a^6*tan(1/2*d*x + 1/2*c)^3 - 315*a^6*tan(1/
2*d*x + 1/2*c)^2 - 105*a^6*tan(1/2*d*x + 1/2*c))/a^7 - (2178*tan(1/2*d*x + 1/2*c)^7 - 105*tan(1/2*d*x + 1/2*c)
^6 - 315*tan(1/2*d*x + 1/2*c)^5 + 63*tan(1/2*d*x + 1/2*c)^4 + 63*tan(1/2*d*x + 1/2*c)^3 - 21*tan(1/2*d*x + 1/2
*c)^2 - 7*tan(1/2*d*x + 1/2*c) + 3)/(a*tan(1/2*d*x + 1/2*c)^7))/d

Mupad [B] (verification not implemented)

Time = 11.95 (sec) , antiderivative size = 387, normalized size of antiderivative = 3.65 \[ \int \frac {\cot ^8(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-3\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-7\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}+7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-21\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+63\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+63\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-315\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-105\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+105\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+315\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-63\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-63\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+21\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+840\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2688\,a\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7} \]

[In]

int(cos(c + d*x)^8/(sin(c + d*x)^8*(a + a*sin(c + d*x))),x)

[Out]

(3*sin(c/2 + (d*x)/2)^14 - 3*cos(c/2 + (d*x)/2)^14 - 7*cos(c/2 + (d*x)/2)*sin(c/2 + (d*x)/2)^13 + 7*cos(c/2 +
(d*x)/2)^13*sin(c/2 + (d*x)/2) - 21*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^12 + 63*cos(c/2 + (d*x)/2)^3*sin(c
/2 + (d*x)/2)^11 + 63*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^10 - 315*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)
^9 - 105*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^8 + 105*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x)/2)^6 + 315*cos(c
/2 + (d*x)/2)^9*sin(c/2 + (d*x)/2)^5 - 63*cos(c/2 + (d*x)/2)^10*sin(c/2 + (d*x)/2)^4 - 63*cos(c/2 + (d*x)/2)^1
1*sin(c/2 + (d*x)/2)^3 + 21*cos(c/2 + (d*x)/2)^12*sin(c/2 + (d*x)/2)^2 + 840*log(sin(c/2 + (d*x)/2)/cos(c/2 +
(d*x)/2))*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2)^7)/(2688*a*d*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2)^7)